﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
             xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
             xmlns:bc="clr-namespace:Buttercup.Control"
             x:Class="Buttercup.Control.App"
             >
    <Application.Resources>

		<LinearGradientBrush x:Key="YellowGradientLR" StartPoint="0,0.5" EndPoint="1,0.5">
			<LinearGradientBrush.GradientStops>
				<GradientStop Color="#FF9900" Offset="0"/>
				<GradientStop Color="#FFBF00" Offset="0.328042"/>
				<GradientStop Color="#FFE500" Offset="1"/>
			</LinearGradientBrush.GradientStops>
		</LinearGradientBrush>

		<Style x:Key="PanelHeading" TargetType="TextBlock">
            <Setter Property="Margin" Value="0,0,40,8" />
            <Setter Property="MinHeight" Value="32" />
            <Setter Property="FontSize" Value="16" />
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="TextWrapping" Value="Wrap" />
        </Style>

		<Style x:Key="PopupHeading" TargetType="TextBlock">
			<Setter Property="Margin" Value="0,0,48,0" />
			<Setter Property="FontSize" Value="16" />
			<Setter Property="FontWeight" Value="Bold" />
		</Style>

		<Style x:Key="SplashHeading" TargetType="TextBlock">
			<Setter Property="Margin" Value="52,16,0,0" />
			<Setter Property="FontSize" Value="24" />
			<Setter Property="TextWrapping" Value="Wrap" />
		</Style>
		
		<Style x:Key="SplashText" TargetType="TextBlock">
			<Setter Property="Margin" Value="52,0,0,0" />
			<Setter Property="FontSize" Value="16" />
			<Setter Property="TextWrapping" Value="Wrap" />
		</Style>

		<Style x:Key="HorizontalSeparator" TargetType="Rectangle">
			<Setter Property="Height" Value="2" />
			<Setter Property="Margin" Value="0,8,0,8" />
			<Setter Property="Opacity" Value="0.5" />
		</Style>
		
		<Style x:Key="SectionFrame" TargetType="Border">
			<Setter Property="CornerRadius" Value="12" />
			<Setter Property="BorderThickness" Value="3" />
			<Setter Property="Padding" Value="8" />
		</Style>
		
		
        <ControlTemplate x:Key="DefButtonTemplate" TargetType="bc:MediaButton">
            <Grid>
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonFocusArea"
                                        Storyboard.TargetProperty="(Border.Opacity)"
                                    	To="1" />
                            </Storyboard>
                        </vsm:VisualState>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition From="Normal" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
							<vsm:VisualTransition From="MouseOver" To="Normal"
                                    GeneratedDuration="00:00:00.2000000" />
							<vsm:VisualTransition From="MouseOver" To="Pressed"
                                    GeneratedDuration="00:00:00.2000000" />
                            <vsm:VisualTransition From="Pressed" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
                        </vsm:VisualStateGroup.Transitions>
						<vsm:VisualState x:Name="Normal"/>
						<vsm:VisualState x:Name="MouseOver">
                            <Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonFaceArea"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonFocusArea"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonSelectedArea"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
							</Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonFaceArea"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonFocusArea"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonSelectedArea"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonSelectedArea"
                                        Storyboard.TargetProperty="Width"
                                    	To="36" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonSelectedArea"
                                        Storyboard.TargetProperty="Height"
                                    	To="36" />
							</Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="contentPresenter"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.33" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="buttonFaceArea"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.33" />
                            </Storyboard>
                        </vsm:VisualState>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>

				<Border x:Name="buttonFaceArea" Margin="2" CornerRadius="3"
                        Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding Foreground}"
                        BorderThickness="1.5">
				</Border>
				<Border x:Name="buttonFocusArea" Margin="2" CornerRadius="3" Opacity="0"
                        Background="{TemplateBinding FocusBackground}" BorderBrush="{x:Null}"
                        BorderThickness="0">
				</Border>
				<Border x:Name="buttonSelectedArea" Margin="2" CornerRadius="3" Opacity="0"
                        Background="{TemplateBinding SelectionBackground}" BorderBrush="{x:Null}"
                        BorderThickness="0">
				</Border>
				<ContentPresenter x:Name="contentPresenter" Margin="4" 
                                  HorizontalAlignment="Center" VerticalAlignment="Center"
								  />
				<!--Border x:Name="buttonFocusDecorator" Margin="0" CornerRadius="3" 
                        Background="{x:Null}" Opacity="0.0" BorderThickness="4"
                        BorderBrush="{TemplateBinding Foreground}">
                    <Border Margin="-2.75" BorderThickness="1.5" CornerRadius="3" Background="{x:Null}"
                            BorderBrush="{TemplateBinding SelectionBackground}" >
                    </Border>
                </Border-->
            </Grid>
        </ControlTemplate>

        <Style x:Key="DefaultButton" TargetType="bc:MediaButton">
            <Setter Property="Template" Value="{StaticResource DefButtonTemplate}" />
        </Style>

        <Style x:Key="SquareButton" TargetType="bc:MediaButton">
            <Setter Property="Width" Value="32" />
            <Setter Property="Height" Value="32" />
            <Setter Property="Template" Value="{StaticResource DefButtonTemplate}" />
        </Style>

        <Style x:Key="LongButton" TargetType="bc:MediaButton">
            <Setter Property="Width" Value="64" />
            <Setter Property="Height" Value="32" />
            <Setter Property="Template" Value="{StaticResource DefButtonTemplate}" />
        </Style>
        
        
        
        <!-- ThumbButtons / RepeatButtons -->
        <ControlTemplate x:Key="VolumeSliderThumbStyle" TargetType="Thumb">
			<Grid>
				<vsm:VisualStateManager.VisualStateGroups>
					<vsm:VisualStateGroup x:Name="FocusStates">
						<vsm:VisualState x:Name="Unfocused"/>
						<vsm:VisualState x:Name="Focused">
							<Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(Border.Opacity)"
                                    	To="1" />
							</Storyboard>
						</vsm:VisualState>
					</vsm:VisualStateGroup>
					<vsm:VisualStateGroup x:Name="CommonStates">
						<vsm:VisualStateGroup.Transitions>
							<vsm:VisualTransition From="Normal" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
							<vsm:VisualTransition From="MouseOver" To="Normal"
                                    GeneratedDuration="00:00:00.2000000" />
							<vsm:VisualTransition From="MouseOver" To="Pressed"
                                    GeneratedDuration="00:00:00.2000000" />
							<vsm:VisualTransition From="Pressed" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
						</vsm:VisualStateGroup.Transitions>
						<vsm:VisualState x:Name="Normal"/>
						<vsm:VisualState x:Name="MouseOver">
							<Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="normalItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Pressed">
							<Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="normalItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="Width"
                                    	To="28" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="Height"
                                    	To="28" />
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Disabled">
							<Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="disableOverlay"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.33" />
							</Storyboard>
						</vsm:VisualState>
					</vsm:VisualStateGroup>
				</vsm:VisualStateManager.VisualStateGroups>
				
				
				<Border x:Name="normalItem" Width="28" Height="28" CornerRadius="16" BorderThickness="1.5"
						Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding Foreground}">
					<Path Width="17.472" Height="15.3413" Stretch="Fill" Fill="{TemplateBinding Foreground}"
						  Data="F1 M 294.512,433.786L 293.568,434.728C 294.483,435.645 295.043,436.897 295.047,438.293C 295.043,439.685 294.48,440.942 293.568,441.854L 294.512,442.801C 295.663,441.65 296.379,440.05 296.379,438.293C 296.379,436.532 295.66,434.937 294.512,433.786 Z M 296.096,432.202L 295.154,433.145C 296.468,434.466 297.283,436.28 297.283,438.294C 297.283,440.304 296.468,442.121 295.152,443.438L 296.096,444.382C 297.65,442.825 298.615,440.669 298.615,438.294C 298.615,435.916 297.65,433.76 296.096,432.202 Z M 295.152,433.146L 295.152,433.144M 297.675,430.621L 296.734,431.565C 298.456,433.286 299.522,435.662 299.522,438.294C 299.522,440.921 298.456,443.297 296.734,445.018L 297.675,445.962C 299.64,444.004 300.858,441.284 300.854,438.294C 300.858,435.3 299.64,432.58 297.675,430.621 Z M 283.382,435.633L 283.382,440.956L 287.851,440.956L 292.228,445.034L 292.228,431.552L 287.852,435.633L 283.382,435.633 Z "/>
				</Border>
				<Border x:Name="focusItem" Width="32" Height="32" CornerRadius="16"
						Opacity="0" Background="{TemplateBinding FocusBackground}">
					<Path Width="17.472" Height="15.3413" Stretch="Fill" Fill="{TemplateBinding FocusForeground}"
						  Data="F1 M 294.512,433.786L 293.568,434.728C 294.483,435.645 295.043,436.897 295.047,438.293C 295.043,439.685 294.48,440.942 293.568,441.854L 294.512,442.801C 295.663,441.65 296.379,440.05 296.379,438.293C 296.379,436.532 295.66,434.937 294.512,433.786 Z M 296.096,432.202L 295.154,433.145C 296.468,434.466 297.283,436.28 297.283,438.294C 297.283,440.304 296.468,442.121 295.152,443.438L 296.096,444.382C 297.65,442.825 298.615,440.669 298.615,438.294C 298.615,435.916 297.65,433.76 296.096,432.202 Z M 295.152,433.146L 295.152,433.144M 297.675,430.621L 296.734,431.565C 298.456,433.286 299.522,435.662 299.522,438.294C 299.522,440.921 298.456,443.297 296.734,445.018L 297.675,445.962C 299.64,444.004 300.858,441.284 300.854,438.294C 300.858,435.3 299.64,432.58 297.675,430.621 Z M 283.382,435.633L 283.382,440.956L 287.851,440.956L 292.228,445.034L 292.228,431.552L 287.852,435.633L 283.382,435.633 Z "/>
				</Border>
				<Border x:Name="selectedItem" Width="28" Height="28" CornerRadius="16"
						Opacity="0" Background="{TemplateBinding SelectionBackground}">
					<Path Width="17.472" Height="15.3413" Stretch="Fill" Fill="{TemplateBinding SelectionForeground}"
						  Data="F1 M 294.512,433.786L 293.568,434.728C 294.483,435.645 295.043,436.897 295.047,438.293C 295.043,439.685 294.48,440.942 293.568,441.854L 294.512,442.801C 295.663,441.65 296.379,440.05 296.379,438.293C 296.379,436.532 295.66,434.937 294.512,433.786 Z M 296.096,432.202L 295.154,433.145C 296.468,434.466 297.283,436.28 297.283,438.294C 297.283,440.304 296.468,442.121 295.152,443.438L 296.096,444.382C 297.65,442.825 298.615,440.669 298.615,438.294C 298.615,435.916 297.65,433.76 296.096,432.202 Z M 295.152,433.146L 295.152,433.144M 297.675,430.621L 296.734,431.565C 298.456,433.286 299.522,435.662 299.522,438.294C 299.522,440.921 298.456,443.297 296.734,445.018L 297.675,445.962C 299.64,444.004 300.858,441.284 300.854,438.294C 300.858,435.3 299.64,432.58 297.675,430.621 Z M 283.382,435.633L 283.382,440.956L 287.851,440.956L 292.228,445.034L 292.228,431.552L 287.852,435.633L 283.382,435.633 Z "/>
				</Border>
				<Rectangle x:Name="disableOverlay" Fill="{TemplateBinding Background}" Opacity="0" />
			</Grid>
		</ControlTemplate>

        <ControlTemplate x:Key="RateSliderThumbStyle" TargetType="Thumb">
            <Grid>
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(Border.Opacity)"
                                    	To="1" />
                            </Storyboard>
                        </vsm:VisualState>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition From="Normal" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
                            <vsm:VisualTransition From="MouseOver" To="Normal"
                                    GeneratedDuration="00:00:00.2000000" />
                            <vsm:VisualTransition From="MouseOver" To="Pressed"
                                    GeneratedDuration="00:00:00.2000000" />
                            <vsm:VisualTransition From="Pressed" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="normalItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="normalItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="Width"
                                    	To="28" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="Height"
                                    	To="28" />
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="disableOverlay"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.33" />
                            </Storyboard>
                        </vsm:VisualState>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>


                <Border x:Name="normalItem" Width="28" Height="28" CornerRadius="16" BorderThickness="1.5"
						Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding Foreground}">
                    <Path Width="10" Height="13" Stretch="Fill" Fill="{TemplateBinding Foreground}"
						  Data="F1 M 286.129,296.767L 298.705,304.024L 286.129,311.291L 286.129,296.767 Z "/>
                </Border>
                <Border x:Name="focusItem" Width="32" Height="32" CornerRadius="16"
						Opacity="0" Background="{TemplateBinding FocusBackground}">
                    <Path Width="10" Height="13" Stretch="Fill" Fill="{TemplateBinding FocusForeground}"
						  Data="F1 M 286.129,296.767L 298.705,304.024L 286.129,311.291L 286.129,296.767 Z "/>
                </Border>
                <Border x:Name="selectedItem" Width="28" Height="28" CornerRadius="16"
						Opacity="0" Background="{TemplateBinding SelectionBackground}">
                    <Path Width="10" Height="13" Stretch="Fill" Fill="{TemplateBinding SelectionForeground}"
						  Data="F1 M 286.129,296.767L 298.705,304.024L 286.129,311.291L 286.129,296.767 Z "/>
                </Border>
                <Rectangle x:Name="disableOverlay" Fill="{TemplateBinding Background}" Opacity="0" />
            </Grid>
        </ControlTemplate>

        <ControlTemplate x:Key="MutedVolumeSliderThumbStyle" TargetType="Thumb">
            <Grid>
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Unfocused"/>
                        <vsm:VisualState x:Name="Focused">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(Border.Opacity)"
                                    	To="1" />
                            </Storyboard>
                        </vsm:VisualState>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition From="Normal" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
                            <vsm:VisualTransition From="MouseOver" To="Normal"
                                    GeneratedDuration="00:00:00.2000000" />
                            <vsm:VisualTransition From="MouseOver" To="Pressed"
                                    GeneratedDuration="00:00:00.2000000" />
                            <vsm:VisualTransition From="Pressed" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="normalItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="normalItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="Width"
                                    	To="28" />
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="Height"
                                    	To="28" />
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled">
                            <Storyboard>
                                <DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="disableOverlay"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.33" />
                            </Storyboard>
                        </vsm:VisualState>
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>


                <Border x:Name="normalItem" Width="28" Height="28" CornerRadius="16" BorderThickness="1.5"
						Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding Foreground}">
                    <Path Width="17.472" Height="15.3413" Stretch="Fill" Fill="{TemplateBinding Foreground}"
						  Data="F1 M -62.1481,251.02L -66.6667,255.539L -62.1481,260.056L -63.8992,261.806L -68.4164,257.289L -72.9338,261.806L -74.6835,260.056L -70.165,255.539L -74.6835,251.02L -72.9338,249.273L -68.4164,253.789L -63.8992,249.273L -62.1481,251.02 Z M -90.6667,251.218L -83.4032,251.218L -76.2934,244.587L -76.2934,266.492L -83.4053,259.866L -90.6667,259.866L -90.6667,251.218 Z "/>
                </Border>
                <Border x:Name="focusItem" Width="32" Height="32" CornerRadius="16"
						Opacity="0" Background="{TemplateBinding FocusBackground}">
                    <Path Width="17.472" Height="15.3413" Stretch="Fill" Fill="{TemplateBinding FocusForeground}"
						  Data="F1 M -62.1481,251.02L -66.6667,255.539L -62.1481,260.056L -63.8992,261.806L -68.4164,257.289L -72.9338,261.806L -74.6835,260.056L -70.165,255.539L -74.6835,251.02L -72.9338,249.273L -68.4164,253.789L -63.8992,249.273L -62.1481,251.02 Z M -90.6667,251.218L -83.4032,251.218L -76.2934,244.587L -76.2934,266.492L -83.4053,259.866L -90.6667,259.866L -90.6667,251.218 Z "/>
                </Border>
                <Border x:Name="selectedItem" Width="28" Height="28" CornerRadius="16"
						Opacity="0" Background="{TemplateBinding SelectionBackground}">
                    <Path Width="17.472" Height="15.3413" Stretch="Fill" Fill="{TemplateBinding SelectionForeground}"
						  Data="F1 M -62.1481,251.02L -66.6667,255.539L -62.1481,260.056L -63.8992,261.806L -68.4164,257.289L -72.9338,261.806L -74.6835,260.056L -70.165,255.539L -74.6835,251.02L -72.9338,249.273L -68.4164,253.789L -63.8992,249.273L -62.1481,251.02 Z M -90.6667,251.218L -83.4032,251.218L -76.2934,244.587L -76.2934,266.492L -83.4053,259.866L -90.6667,259.866L -90.6667,251.218 Z "/>
                </Border>
                <Rectangle x:Name="disableOverlay" Fill="{TemplateBinding Background}" Opacity="0" />
            </Grid>
        </ControlTemplate>
        
		<ControlTemplate x:Key="RescaleSliderThumbStyle" TargetType="Thumb">
			<Grid>
				<vsm:VisualStateManager.VisualStateGroups>
					<vsm:VisualStateGroup x:Name="FocusStates">
						<vsm:VisualState x:Name="Unfocused"/>
						<vsm:VisualState x:Name="Focused">
							<Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(Border.Opacity)"
                                    	To="1" />
							</Storyboard>
						</vsm:VisualState>
					</vsm:VisualStateGroup>
					<vsm:VisualStateGroup x:Name="CommonStates">
						<vsm:VisualStateGroup.Transitions>
							<vsm:VisualTransition From="Normal" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
							<vsm:VisualTransition From="MouseOver" To="Normal"
                                    GeneratedDuration="00:00:00.2000000" />
							<vsm:VisualTransition From="MouseOver" To="Pressed"
                                    GeneratedDuration="00:00:00.2000000" />
							<vsm:VisualTransition From="Pressed" To="MouseOver"
                                    GeneratedDuration="00:00:00.2000000" />
						</vsm:VisualStateGroup.Transitions>
						<vsm:VisualState x:Name="Normal"/>
						<vsm:VisualState x:Name="MouseOver">
							<Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="normalItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Pressed">
							<Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="normalItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="focusItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1.0" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="Width"
                                    	To="28" />
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="selectedItem"
                                        Storyboard.TargetProperty="Height"
                                    	To="28" />
							</Storyboard>
						</vsm:VisualState>
						<vsm:VisualState x:Name="Disabled">
							<Storyboard>
								<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="disableOverlay"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.33" />
							</Storyboard>
						</vsm:VisualState>
					</vsm:VisualStateGroup>
				</vsm:VisualStateManager.VisualStateGroups>


				<Border x:Name="normalItem" Width="28" Height="28" CornerRadius="16" BorderThickness="1.5"
						Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding Foreground}"
						Padding="0,0,2,0">
					<Canvas Height="12.509" Width="19.532">
						<Path Width="7.59906" Height="12.509" Canvas.Left="12" Canvas.Top="0" Stretch="Fill"
							  Fill="{TemplateBinding Foreground}"
							  Data="F1 M 11.7721,0L 19.3712,6.25L 11.7721,12.509L 11.7721,0 Z "/>
						<Path Width="7.59773" Height="12.509" Canvas.Left="0.228" Canvas.Top="0" Stretch="Fill"
							  Fill="{TemplateBinding Foreground}"
							  Data="F1 M 7.59773,12.509L 0,6.25775L 7.59773,0L 7.59773,12.509 Z "/>
					</Canvas>
				</Border>
				<Border x:Name="focusItem" Width="32" Height="32" CornerRadius="16"
						Opacity="0" Background="{TemplateBinding FocusBackground}">
					<Canvas Height="12.509" Width="19.532">
						<Path Width="7.59906" Height="12.509" Canvas.Left="12" Canvas.Top="0" Stretch="Fill"
							  Fill="{TemplateBinding FocusForeground}"
							  Data="F1 M 11.7721,0L 19.3712,6.25L 11.7721,12.509L 11.7721,0 Z "/>
						<Path Width="7.59773" Height="12.509" Canvas.Left="0.228" Canvas.Top="0" Stretch="Fill"
							  Fill="{TemplateBinding FocusForeground}"
							  Data="F1 M 7.59773,12.509L 0,6.25775L 7.59773,0L 7.59773,12.509 Z "/>
					</Canvas>
				</Border>
				<Border x:Name="selectedItem" Width="28" Height="28" CornerRadius="16"
						Opacity="0" Background="{TemplateBinding SelectionBackground}">
					<Canvas Height="12.509" Width="19.532">
						<Path Width="7.59906" Height="12.509" Canvas.Left="12" Canvas.Top="0" Stretch="Fill"
							  Fill="{TemplateBinding SelectionForeground}"
							  Data="F1 M 11.7721,0L 19.3712,6.25L 11.7721,12.509L 11.7721,0 Z "/>
						<Path Width="7.59773" Height="12.509" Canvas.Left="0.228" Canvas.Top="0" Stretch="Fill"
							  Fill="{TemplateBinding SelectionForeground}"
							  Data="F1 M 7.59773,12.509L 0,6.25775L 7.59773,0L 7.59773,12.509 Z "/>
					</Canvas>
				</Border>
				<Rectangle x:Name="disableOverlay" Fill="{TemplateBinding Background}" Opacity="0" />
			</Grid>
		</ControlTemplate>

		<ControlTemplate x:Key="ScrollBarThumbStyle" TargetType="Thumb">
			<Grid>
				<Rectangle Margin="6" RadiusX="3" RadiusY="3" Fill="{TemplateBinding Foreground}" />
			</Grid>
		</ControlTemplate>

		<ControlTemplate x:Key="SliderRepeatButton">
			<Grid x:Name="Root" Opacity="0" Background="Transparent" />
		</ControlTemplate>
		
		<ControlTemplate x:Key="ScrollBarRepeatButton" TargetType="RepeatButton">
			<Grid x:Name="Root" Background="Transparent">
				<vsm:VisualStateManager.VisualStateGroups>
					<vsm:VisualStateGroup x:Name="CommonStates">
						<vsm:VisualState x:Name="Normal" />
					</vsm:VisualStateGroup>
				</vsm:VisualStateManager.VisualStateGroups>
			</Grid>
		</ControlTemplate>
		
		<ControlTemplate x:Key="IncrementRepeatButton" TargetType="RepeatButton">
			<Grid x:Name="Root" Background="Transparent" Margin="4">
				<Path Width="16" Height="16" Stretch="Uniform" Fill="{TemplateBinding Foreground}"
					  Data="M 0.0,2	L 16,2	L 8.0,16 Z"/>
			</Grid>
		</ControlTemplate>

		<ControlTemplate x:Key="DecrementRepeatButton" TargetType="RepeatButton">
			<Grid x:Name="Root" Background="Transparent" Margin="4">
				<Path Width="16" Height="16" Stretch="Uniform" Fill="{TemplateBinding Foreground}"
					  Data="M 8.0,0.0	L 16,14	L 0.0,14 Z"/>
			</Grid>
		</ControlTemplate>

		<ControlTemplate x:Key="RightArrowButton" TargetType="RepeatButton">
			<Grid x:Name="Root" Background="Transparent" Margin="4">
				<Border BorderBrush="{x:Null}"
						Background="{TemplateBinding Background}">
					<Path Width="16" Height="16" Stretch="Uniform" Fill="{TemplateBinding Foreground}"
						  Data="M 2,16	L 2,0	L 16,8 Z"/>
				</Border>
			</Grid>
		</ControlTemplate>

		<ControlTemplate x:Key="LeftArrowButton" TargetType="RepeatButton">
			<Grid x:Name="Root" Background="Transparent" Margin="4">
				<Border BorderBrush="{x:Null}" 
					Background="{TemplateBinding Background}">
					<Path Width="16" Height="16" Stretch="Uniform" Fill="{TemplateBinding Foreground}"
						  Data="M 0,8	L 14,0	L 14,16 Z"/>
				</Border>
			</Grid>
		</ControlTemplate>


		<!-- Sliders -->

		
		<Style x:Key="VolumeSlider" TargetType="bc:MediaSlider">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="bc:MediaSlider">
                        <Grid x:Name="Root">
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualState x:Name="Normal"/>
									<vsm:VisualState x:Name="MouseOver"/>
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Storyboard.TargetName="HorizontalThumb"
													Storyboard.TargetProperty="(UIElement.Opacity)"
													To="0.5"/>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							
							<Grid x:Name="HorizontalTemplate">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
									<ColumnDefinition Width="Auto" />
									<ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                
                                <!-- Track -->
                                <Rectangle Grid.ColumnSpan="3" VerticalAlignment="Center"
                                           StrokeThickness="0" Stroke="{x:Null}" 
                                           Fill="{TemplateBinding Foreground}" 
                                           Height="4" RadiusX="2" RadiusY="2" Margin="4,0,4,0" />
                                
								<RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
								<RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" Grid.Column="2"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
								<Thumb x:Name="HorizontalThumb" Grid.Column="1" VerticalAlignment="Center"
										Template="{StaticResource VolumeSliderThumbStyle}" IsTabStop="True"
										Background="{TemplateBinding Background}"
										Foreground="{TemplateBinding Foreground}"
									    />
                            </Grid>

							<Grid x:Name="VerticalTemplate">
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto" />
									<RowDefinition Height="Auto" />
									<RowDefinition Height="*" />
								</Grid.RowDefinitions>

								<!-- Track -->
								<Rectangle Grid.RowSpan="3" VerticalAlignment="Center"
                                           StrokeThickness="{TemplateBinding BorderThickness}"
                                           Stroke="{TemplateBinding BorderBrush}" 
                                           Fill="{TemplateBinding Background}" 
                                           Width="4" RadiusX="2" RadiusY="2" />

								<RepeatButton x:Name="VerticalLargeChangeDecreaseRepeatButton"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
								<RepeatButton x:Name="VerticalLargeChangeIncreaseRepeatButton" Grid.Row="2"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
								<Thumb x:Name="VerticalThumb" Grid.Row="1" VerticalAlignment="Center"
										Template="{StaticResource VolumeSliderThumbStyle}" IsTabStop="True"
										Background="{TemplateBinding Background}"
										Foreground="{TemplateBinding Foreground}" />
							</Grid>
						</Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="RateSlider" TargetType="bc:MediaSlider">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="bc:MediaSlider">
                        <Grid x:Name="Root">
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal"/>
                                    <vsm:VisualState x:Name="MouseOver"/>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="HorizontalThumb"
													Storyboard.TargetProperty="(UIElement.Opacity)"
													To="0.5"/>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>

                            <Grid x:Name="HorizontalTemplate">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <!-- Track -->
                                <Rectangle Grid.ColumnSpan="3" VerticalAlignment="Center"
                                           StrokeThickness="0" Stroke="{x:Null}" 
                                           Fill="{TemplateBinding Foreground}" 
                                           Height="4" RadiusX="2" RadiusY="2" Margin="4,0,4,0" />

                                <RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
                                <RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" Grid.Column="2"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
                                <Thumb x:Name="HorizontalThumb" Grid.Column="1" VerticalAlignment="Center"
										Template="{StaticResource RateSliderThumbStyle}" IsTabStop="True"
										Background="{TemplateBinding Background}"
										Foreground="{TemplateBinding Foreground}"
									    />
                            </Grid>

                            <Grid x:Name="VerticalTemplate">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>

                                <!-- Track -->
                                <Rectangle Grid.RowSpan="3" VerticalAlignment="Center"
                                           StrokeThickness="{TemplateBinding BorderThickness}"
                                           Stroke="{TemplateBinding BorderBrush}" 
                                           Fill="{TemplateBinding Background}" 
                                           Width="4" RadiusX="2" RadiusY="2" />

                                <RepeatButton x:Name="VerticalLargeChangeDecreaseRepeatButton"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
                                <RepeatButton x:Name="VerticalLargeChangeIncreaseRepeatButton" Grid.Row="2"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
                                <Thumb x:Name="VerticalThumb" Grid.Row="1" VerticalAlignment="Center"
										Template="{StaticResource RateSliderThumbStyle}" IsTabStop="True"
										Background="{TemplateBinding Background}"
										Foreground="{TemplateBinding Foreground}" />
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="RescaleSlider" TargetType="bc:MediaSlider">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="bc:MediaSlider">
						<Grid x:Name="Root">
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualState x:Name="Normal"/>
									<vsm:VisualState x:Name="MouseOver"/>
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Storyboard.TargetName="HorizontalThumb"
													Storyboard.TargetProperty="(UIElement.Opacity)"
													To="0.5"/>
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>

							<Grid x:Name="HorizontalTemplate">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto" />
									<ColumnDefinition Width="Auto" />
									<ColumnDefinition Width="*" />
								</Grid.ColumnDefinitions>

								<!-- Track -->
								<Rectangle Grid.ColumnSpan="3" VerticalAlignment="Center"
                                           StrokeThickness="0" Stroke="{x:Null}" 
                                           Fill="{TemplateBinding Foreground}" 
                                           Height="4" RadiusX="2" RadiusY="2" Margin="4,0,4,0" />

								<RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
								<RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" Grid.Column="2"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
								<Thumb x:Name="HorizontalThumb" Grid.Column="1" VerticalAlignment="Center"
										Template="{StaticResource RescaleSliderThumbStyle}" IsTabStop="True"
										Background="{TemplateBinding Background}"
										Foreground="{TemplateBinding Foreground}"
									    />
							</Grid>

							<Grid x:Name="VerticalTemplate">
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto" />
									<RowDefinition Height="Auto" />
									<RowDefinition Height="*" />
								</Grid.RowDefinitions>

								<!-- Track -->
								<Rectangle Grid.RowSpan="3" VerticalAlignment="Center"
                                           StrokeThickness="{TemplateBinding BorderThickness}"
                                           Stroke="{TemplateBinding BorderBrush}" 
                                           Fill="{TemplateBinding Background}" 
                                           Width="4" RadiusX="2" RadiusY="2" />

								<RepeatButton x:Name="VerticalLargeChangeDecreaseRepeatButton"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
								<RepeatButton x:Name="VerticalLargeChangeIncreaseRepeatButton" Grid.Row="2"
											  Template="{StaticResource SliderRepeatButton}"
											  IsTabStop="False" />
								<Thumb x:Name="VerticalThumb" Grid.Row="1" VerticalAlignment="Center"
										Template="{StaticResource RescaleSliderThumbStyle}" IsTabStop="True"
										Background="{TemplateBinding Background}"
										Foreground="{TemplateBinding Foreground}" />
							</Grid>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>



		<!-- Scrollbars / ScrollViewers -->
        
		
		<Style x:Key="DefaultScrollBar" TargetType="ScrollBar">
			<Setter Property="MinWidth" Value="24"/>
			<Setter Property="MinHeight" Value="24"/>
			<Setter Property="IsTabStop" Value="False"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ScrollBar">
						<Grid x:Name="Root" Margin="5"
								Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualState x:Name="Normal" />
									<vsm:VisualState x:Name="MouseOver" />
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Storyboard.TargetName="Root"
													Storyboard.TargetProperty="Opacity" Duration="0"
													To="0.5" />
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							
							<Grid x:Name="HorizontalRoot">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto" />
									<ColumnDefinition Width="Auto" />
									<ColumnDefinition Width="Auto" MinWidth="16" />
									<ColumnDefinition Width="*" />
									<ColumnDefinition Width="Auto" />
								</Grid.ColumnDefinitions>

								<!-- Track -->
								<Rectangle Grid.Column="1" Grid.ColumnSpan="3" MinWidth="16"
                                           StrokeThickness="2" Stroke="{TemplateBinding Foreground}" 
                                           Fill="{TemplateBinding Background}" 
                                           RadiusX="8" RadiusY="8" />

								<RepeatButton x:Name="HorizontalSmallDecrease"
											  Grid.Column="0"
											  Template="{StaticResource LeftArrowButton}"
											  Foreground="{TemplateBinding Foreground}"
											  Background="{TemplateBinding Background}"
											  IsTabStop="False" Interval="50" />
								<RepeatButton x:Name="HorizontalLargeDecrease"
											  Grid.Column="1"
											  Template="{StaticResource ScrollBarRepeatButton}"
											  IsTabStop="False" Interval="50" />
								<Thumb x:Name="HorizontalThumb" Grid.Column="2"
										Template="{StaticResource ScrollBarThumbStyle}"
										Foreground="{TemplateBinding Foreground}"
									   MinWidth="16" />
								<RepeatButton x:Name="HorizontalLargeIncrease"
											  Grid.Column="3"
											  Template="{StaticResource ScrollBarRepeatButton}"
											  IsTabStop="False" Interval="50" />
								<RepeatButton x:Name="HorizontalSmallIncrease"
											  Grid.Column="4"
											  Template="{StaticResource RightArrowButton}"
											  Foreground="{TemplateBinding Foreground}"
											  Background="{TemplateBinding Background}"
											  IsTabStop="False" Interval="50" />
							</Grid>

							<Grid x:Name="VerticalRoot">
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto" />
									<RowDefinition Height="Auto" />
									<RowDefinition Height="Auto" MinHeight="16"  />
									<RowDefinition Height="*" />
									<RowDefinition Height="Auto" />
								</Grid.RowDefinitions>

								<!-- Track -->
								<Rectangle Grid.Row="1" Grid.RowSpan="3" MinHeight="16"
                                           StrokeThickness="2" Stroke="{TemplateBinding Foreground}" 
                                           Fill="{TemplateBinding Background}" 
                                           RadiusX="8" RadiusY="8" />

                                <RepeatButton x:Name="VerticalSmallDecrease"
											  Grid.Row="0"
											  Template="{StaticResource DecrementRepeatButton}"
											  Foreground="{TemplateBinding Foreground}"
											  Background="{TemplateBinding Background}"
											  IsTabStop="False" Interval="50" />
								<RepeatButton x:Name="VerticalLargeDecrease"
											  Grid.Row="1"
											  Template="{StaticResource ScrollBarRepeatButton}"
											  IsTabStop="False" Interval="50" />
								<Thumb x:Name="VerticalThumb" Grid.Row="2"
										Template="{StaticResource ScrollBarThumbStyle}"
										Foreground="{TemplateBinding Foreground}"
									   MinHeight="16" />
								<RepeatButton x:Name="VerticalLargeIncrease"
											  Grid.Row="3"
											  Template="{StaticResource ScrollBarRepeatButton}"
											  IsTabStop="False" Interval="50" />
								<RepeatButton x:Name="VerticalSmallIncrease"
											  Grid.Row="4"
											  Template="{StaticResource IncrementRepeatButton}"
											  Foreground="{TemplateBinding Foreground}"
											  Background="{TemplateBinding Background}"
											  IsTabStop="False" Interval="50" />
							</Grid>

						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		
		
		<Style x:Key="DefaultScrollViewer" TargetType="ScrollViewer">
			<Setter Property="HorizontalContentAlignment" Value="Left" />
			<Setter Property="VerticalContentAlignment" Value="Top" />
			<Setter Property="VerticalScrollBarVisibility" Value="Visible" />
			<Setter Property="HorizontalScrollBarVisibility" Value="Disabled" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ScrollViewer">
						<Grid Background="{TemplateBinding Background}">
							<Grid.RowDefinitions>
								<RowDefinition Height="*"/>
								<RowDefinition Height="Auto"/>
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*"/>
								<ColumnDefinition Width="Auto"/>
							</Grid.ColumnDefinitions>

							<ScrollContentPresenter x:Name="ScrollContentPresenter"
									Cursor="{TemplateBinding Cursor}"
									Margin="{TemplateBinding Padding}"
									ContentTemplate="{TemplateBinding ContentTemplate}"/>

							<ScrollBar x:Name="VerticalScrollBar" Style="{StaticResource DefaultScrollBar}"
									IsTabStop="False"
									Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
									Foreground="{TemplateBinding Foreground}"
									Grid.Column="1" Grid.Row="0" Orientation="Vertical"
									ViewportSize="{TemplateBinding ViewportHeight}"
									Maximum="{TemplateBinding ScrollableHeight}"
									Minimum="0"
									Value="{TemplateBinding VerticalOffset}"/>

							<ScrollBar x:Name="HorizontalScrollBar" Style="{StaticResource DefaultScrollBar}"
									IsTabStop="False"
									Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
									Foreground="{TemplateBinding Foreground}"
									Grid.Column="0" Grid.Row="1" Orientation="Horizontal"
									ViewportSize="{TemplateBinding ViewportWidth}"
									Maximum="{TemplateBinding ScrollableWidth}"
									Minimum="0"
									Value="{TemplateBinding HorizontalOffset}"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		
		
        
        <!-- Lists (ListBoxes and ListBoxItems) -->
        
        
        <Style x:Key="NonScrollingList" TargetType="ListBox">
			<Setter Property="BorderThickness" Value="2" />
			<Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBox">
                        <Border Name="Border"
								Background="{TemplateBinding Background}"
								BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" Padding="2">
                            <ItemsPresenter />
                        </Border>

                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


		<Style x:Key="ScrollingList" TargetType="ListBox">
			<Setter Property="BorderThickness" Value="2" />
			<Setter Property="ItemsPanel">
				<Setter.Value>
					<ItemsPanelTemplate>
						<StackPanel/>
					</ItemsPanelTemplate>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="ListBox">
						<Border Name="Border"
								Background="{TemplateBinding Background}"
								BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" Padding="2">
							<ScrollViewer x:Name="ScrollViewer" Style="{StaticResource DefaultScrollViewer}"
									Background="{TemplateBinding Background}" Foreground="{TemplateBinding BorderBrush}"
									IsTabStop="False" >
								<ItemsPresenter />	
							</ScrollViewer>
						</Border>

					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>



		<Style x:Key="tickList" TargetType="ListBox">
			<Setter Property="BorderThickness" Value="2" />
			<Setter Property="ItemsPanel">
                <Setter.Value>
                    <ItemsPanelTemplate>
                        <StackPanel/>
                    </ItemsPanelTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBox">
                        <Border Background="{TemplateBinding Background}"
								BorderBrush="{TemplateBinding BorderBrush}"
								VerticalAlignment="Top" MinHeight="64"
                                BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" Padding="2">
                            <ItemsPresenter />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


		<Style x:Key="defaultListItem" TargetType="bc:ExtendedListBoxItem">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="bc:ExtendedListBoxItem">
						<Grid>
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="SelectionStates">
									<vsm:VisualState x:Name="Unselected"/>
									<vsm:VisualState x:Name="Selected">
										<Storyboard>
											<DoubleAnimation
                                                    Duration="00:00:00.0010000"
                                                    Storyboard.TargetName="shadeArea"
                                                    Storyboard.TargetProperty="Opacity" To="1.0" />
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>

							<Border BorderThickness="0" Background="{TemplateBinding Background}" >
								<Grid>
									<Border x:Name="shadeArea" Opacity="0.0" CornerRadius="2"
                                          Background="{TemplateBinding SelectionBackground}" />
									<ContentPresenter VerticalAlignment="Center"
													  Margin="4,0,4,0"
                                                      Content="{TemplateBinding Content}" />
								</Grid>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

		
		<Style x:Key="tickListItem" TargetType="bc:ExtendedListBoxItem">
			<Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="bc:ExtendedListBoxItem">
                        <Grid>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="SelectionStates">
                                    <vsm:VisualState x:Name="Unselected"/>
                                    <vsm:VisualState x:Name="Selected">
                                        <Storyboard>
                                            <DoubleAnimation
                                                    Duration="00:00:00.0010000"
                                                    Storyboard.TargetName="Tick"
                                                    Storyboard.TargetProperty="Opacity" To="1.0" />
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>

                            <Border BorderThickness="0" Background="{TemplateBinding Background}" >
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" MinWidth="16" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    
                                    <Path x:Name="Tick" Width="12" Height="10.2" Stretch="Uniform" Opacity="0.0"
                                          Margin="4" Fill="{TemplateBinding Foreground}"
                                          Data="F1 M 547.314,385.414L 550.665,382.057L 554.025,385.419L 565.983,373.47L 569.333,376.823L 554.025,392.126L 547.314,385.414 Z " />
                                    <ContentPresenter Grid.Column="1" VerticalAlignment="Center"
                                                      Content="{TemplateBinding Content}" />
                                </Grid>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        
        
        <!-- Tab Controls / Tab Items -->
        
        
        <!-- TabControl style for side panel container - no visible tab buttons. -->
        <Style x:Key="PanelContainer" TargetType="basics:TabControl">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="basics:TabControl">
                        <ContentPresenter x:Name="ContentTop" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

		<Style x:Key="SubPanelContainer" TargetType="basics:TabControl">
			<Setter Property="Margin" Value="0" />
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="basics:TabControl">
						<ContentPresenter x:Name="ContentTop" Margin="0"  />
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

		<Style x:Key="PanelItem" TargetType="basics:TabItem">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="basics:TabItem">
                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="3"
                                CornerRadius="12" >
                            <ContentPresenter x:Name="ContentTop" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

		<Style x:Key="SubPanelItem" TargetType="basics:TabItem">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="basics:TabItem">
						<Border Background="{x:Null}" BorderBrush="{x:Null}">
							<ContentPresenter x:Name="ContentTop" />
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

		
		<Style x:Key="DefaultTextBox" TargetType="bc:MediaTextBox">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="bc:MediaTextBox">
						<Grid x:Name="RootElement">
							<vsm:VisualStateManager.VisualStateGroups>
								<vsm:VisualStateGroup x:Name="FocusStates">
									<vsm:VisualState x:Name="Unfocused"/>
									<vsm:VisualState x:Name="Focused">
										<Storyboard>
											<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="UnselectedFrame"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0" />
											<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="FocusFrame"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="1" />
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
								<vsm:VisualStateGroup x:Name="CommonStates">
									<vsm:VisualState x:Name="Normal"/>
									<vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="UnselectedFrame"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.33" />
											<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="FocusFrame"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0" />
										</Storyboard>
									</vsm:VisualState>
									<vsm:VisualState x:Name="Readonly">
										<Storyboard>
											<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="UnselectedFrame"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0.33" />
											<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.0010000"
                                        Storyboard.TargetName="FocusFrame"
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                    	To="0" />
										</Storyboard>
									</vsm:VisualState>
								</vsm:VisualStateGroup>
							</vsm:VisualStateManager.VisualStateGroups>
							
							<Border x:Name="UnselectedFrame" BorderThickness="1.5" CornerRadius="3"
									BorderBrush="{TemplateBinding Foreground}" />
							<Border x:Name="FocusFrame" BorderThickness="1.5" CornerRadius="3" Opacity="0"
									BorderBrush="{TemplateBinding FocusForeground}" />
							<ScrollViewer x:Name="ContentElement" Margin="4" Style="{StaticResource DefaultScrollViewer}"
									Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}"
									IsTabStop="False"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		
	</Application.Resources>
</Application>
